import React from "react";
import { getNews } from "../../../lib/data";
import { NewsSection } from "../../../components/NewsSection";
import { PageHero } from "../../../components/PageHero";

export const revalidate = 300;

export default function NewsPage({ params }: { params: { locale: string } }) {
  const locale = params.locale;
  const data = getNews(locale);
  return (
    <main className="bg-[#f6f8fc] text-[#1e2a3f]">
      {data.hero && (
        <PageHero
          title={data.hero.title}
          subtitle={data.hero.subtitle}
          locale={locale}
        />
      )}
      <NewsSection data={data} />
    </main>
  );
}

